
#include "utils.h"
#include "egb_segment.h"

int main()
{
	/*Mat src = imread("C:/Users/kuenbutsai/Desktop/1.jpg", CV_LOAD_IMAGE_GRAYSCALE);
	Mat dst;

	clock_t t=clock();

	egl_segment segment;

	segment.process(src, dst);

	t = clock() - t;
	printf ( "%f\n", (float)t );

	imshow("", dst);
	waitKey(0);*/

	VideoCapture cap(0);
	Mat src;

	while(1)
    {
		cap >> src;
		cvtColor(src,src, CV_BGR2GRAY);

		Mat dst;

		clock_t t=clock();

		egl_segment segment;

		segment.process(src, dst);

		t = clock() - t;
		printf ( "%f\n", (float)t );

		imshow("", dst);
		waitKey(1);
	}

	return 0;
}